package com.lanyuan.a.bean.union;

import com.lanyuan.a.bean.Store;
import com.lanyuan.a.bean.WindowFood;
import com.lanyuan.a.bean.WindowSale;

public class FoodOrder {
	private String name;//食品名称
	private int w_id;//窗口id
	private int left;//窗口仓库剩余
	private int saleNum;//销量
	private int orderNum;//订购数量
	private double price;//单价
	private double total;//总价钱
	private String optionNum = "<input id='num' type='text' value='0'/><input type='hidden' id='wfid' value='wfid'>";
	private String button = "<a id='order' href='javascript:cc(this)' class='btn btn-default' >订购</a>"
						   +"<a id='can' style='display:none;' href='javascript:cancel(this)' class='btn btn-default' >取消</a>";
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getW_id() {
		return w_id;
	}
	public void setW_id(int w_id) {
		this.w_id = w_id;
	}
	public int getLeft() {
		return left;
	}
	public void setLeft(int left) {
		this.left = left;
	}
	public int getOrderNum() {
		return orderNum;
	}
	public void setOrderNum(int orderNum) {
		this.orderNum = orderNum;
	}
	public double getPrice() {
		return price;
	}
	public void setPrice(double price) {
		this.price = price;
	}
	public double getTotal() {
		return total;
	}
	public void setTotal(double total) {
		this.total = total;
	}
	
	public void setWindowFoodValue(WindowFood ws){
		this.setName(ws.getF_name());
		this.setPrice(ws.getF_price());
		this.setW_id(ws.getW_id());
		this.setSaleNum(ws.getF_salenum());
	}
	public void setStoreValue(Store store){
		this.setLeft(store.getLeft());
		this.setTotal(store.getTotal());
	}
	
	public String getOptionNum() {
		return optionNum;
	}
	public void setOptionNum(String optionNum) {
		this.optionNum = optionNum;
	}
	public String getButton() {
		return button;
	}
	public void setButton(String button) {
		this.button = button;
	}
	@Override
	public String toString() {
		return "FoodOrder [name=" + name + ", w_id=" + w_id + ", left=" + left
				+ ", orderNum=" + orderNum + ", price=" + price + ", total="
				+ total + ", optionNum=" + optionNum + ", button=" + button
				+ "]";
	}
	public int getSaleNum() {
		return saleNum;
	}
	public void setSaleNum(int saleNum) {
		this.saleNum = saleNum;
	}
	
	
}
